//
//  Contact.m
//  ContactSQL
//
//  Created by GUN EMRE on 01/03/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "Contact.h"

@implementation Contact


@synthesize UUID, pseudo,latitude, longitude ; 


-(id)initContact : (NSString *)u : (NSString *)p {
	
	if(self != nil)
	{
		[super init];
		[self setUUID:u];
		[self setPseudo:p];
		[self setLatitude:nil];
		[self setLongitude:nil];
	}
	return self;
}

-(id)initContactWithLatLong : (NSString *)u : (NSString *)p : (NSString *)lat : (NSString *)lon {
	
	if(self != nil)
	{
		[super init];
		[self setUUID:u];
		[self setPseudo:p];
		[self setLatitude:lat];
		[self setLongitude:lon];
		//NSLog(@"Dans init contact : %@ %@",latitude,longitude);
	}
	
	return self;
}


-(NSString *) description
{
	return [NSString stringWithFormat:@"Contact : pseudo = %@, uuid = %@, long = %@, lat = %@", self.pseudo, self.UUID, self.longitude, self.latitude];
}


- (void)dealloc {
	//NSLog(@"Dealloc init contact : %@ %@",latitude,longitude);
	[UUID release];
	[pseudo release];
	[latitude release];
	[longitude release];
    [super dealloc];
}


@end
